home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gnome-vfs-2.0 / libgnomevfs / gnome-vfs-volume.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-01  |  4.9 KB  |  133 lines

  1. /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
  2. /* gnome-vfs-volume.h - Handling of volumes for the GNOME Virtual File System.
  3.  
  4.    Copyright (C) 2003 Red Hat, Inc
  5.  
  6.    The Gnome Library is free software; you can redistribute it and/or
  7.    modify it under the terms of the GNU Library General Public License as
  8.    published by the Free Software Foundation; either version 2 of the
  9.    License, or (at your option) any later version.
  10.  
  11.    The Gnome Library is distributed in the hope that it will be useful,
  12.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.    Library General Public License for more details.
  15.  
  16.    You should have received a copy of the GNU Library General Public
  17.    License along with the Gnome Library; see the file COPYING.LIB.  If not,
  18.    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19.    Boston, MA 02111-1307, USA.
  20.  
  21.    Author: Alexander Larsson <alexl@redhat.com>
  22. */
  23.  
  24. #ifndef GNOME_VFS_VOLUME_H
  25. #define GNOME_VFS_VOLUME_H
  26.  
  27. #include <sys/types.h>
  28. #include <sys/stat.h>
  29. #ifndef _WIN32
  30. #include <unistd.h>
  31. #endif
  32. #include <glib-object.h>
  33.  
  34. G_BEGIN_DECLS
  35.  
  36. #define GNOME_VFS_TYPE_VOLUME        (gnome_vfs_volume_get_type ())
  37. #define GNOME_VFS_VOLUME(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), GNOME_VFS_TYPE_VOLUME, GnomeVFSVolume))
  38. #define GNOME_VFS_VOLUME_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), GNOME_VFS_TYPE_VOLUME, GnomeVFSVolumeClass))
  39. #define GNOME_IS_VFS_VOLUME(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNOME_VFS_TYPE_VOLUME))
  40. #define GNOME_IS_VFS_VOLUME_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNOME_VFS_TYPE_VOLUME))
  41.  
  42. typedef struct _GnomeVFSVolumePrivate GnomeVFSVolumePrivate;
  43.  
  44. typedef enum {
  45.     GNOME_VFS_DEVICE_TYPE_UNKNOWN,
  46.     GNOME_VFS_DEVICE_TYPE_AUDIO_CD,
  47.     GNOME_VFS_DEVICE_TYPE_VIDEO_DVD,
  48.     GNOME_VFS_DEVICE_TYPE_HARDDRIVE, 
  49.     GNOME_VFS_DEVICE_TYPE_CDROM,
  50.     GNOME_VFS_DEVICE_TYPE_FLOPPY,
  51.     GNOME_VFS_DEVICE_TYPE_ZIP,
  52.     GNOME_VFS_DEVICE_TYPE_JAZ,
  53.     GNOME_VFS_DEVICE_TYPE_NFS,
  54.     GNOME_VFS_DEVICE_TYPE_AUTOFS,
  55.     GNOME_VFS_DEVICE_TYPE_CAMERA,
  56.     GNOME_VFS_DEVICE_TYPE_MEMORY_STICK,
  57.     GNOME_VFS_DEVICE_TYPE_SMB,
  58.     GNOME_VFS_DEVICE_TYPE_APPLE,
  59.     GNOME_VFS_DEVICE_TYPE_MUSIC_PLAYER,
  60.     GNOME_VFS_DEVICE_TYPE_WINDOWS, 
  61.     GNOME_VFS_DEVICE_TYPE_LOOPBACK, 
  62.     GNOME_VFS_DEVICE_TYPE_NETWORK 
  63. } GnomeVFSDeviceType;
  64.  
  65. typedef enum {
  66.     GNOME_VFS_VOLUME_TYPE_MOUNTPOINT,
  67.     GNOME_VFS_VOLUME_TYPE_VFS_MOUNT,
  68.     GNOME_VFS_VOLUME_TYPE_CONNECTED_SERVER
  69. } GnomeVFSVolumeType;
  70.  
  71. typedef struct _GnomeVFSVolume GnomeVFSVolume;
  72.  
  73. struct _GnomeVFSVolume {
  74.     GObject parent;
  75.  
  76.         GnomeVFSVolumePrivate *priv;
  77. };
  78.  
  79. typedef struct _GnomeVFSVolumeClass GnomeVFSVolumeClass;
  80.  
  81. struct _GnomeVFSVolumeClass {
  82.     GObjectClass parent_class;
  83. };
  84.  
  85. typedef void (*GnomeVFSVolumeOpCallback) (gboolean succeeded,
  86.                       char *error,
  87.                       char *detailed_error,
  88.                       gpointer data);
  89.  
  90.  
  91. /* Need to declare this here due to cross use in gnome-vfs-drive.h */
  92. typedef struct _GnomeVFSDrive GnomeVFSDrive;
  93.  
  94. #include <libgnomevfs/gnome-vfs-drive.h>
  95.  
  96. GType gnome_vfs_volume_get_type (void) G_GNUC_CONST;
  97.  
  98. GnomeVFSVolume *gnome_vfs_volume_ref   (GnomeVFSVolume *volume);
  99. void            gnome_vfs_volume_unref (GnomeVFSVolume *volume);
  100.  
  101. gulong             gnome_vfs_volume_get_id              (GnomeVFSVolume *volume);
  102. GnomeVFSVolumeType gnome_vfs_volume_get_volume_type     (GnomeVFSVolume *volume);
  103. GnomeVFSDeviceType gnome_vfs_volume_get_device_type     (GnomeVFSVolume *volume);
  104. GnomeVFSDrive *    gnome_vfs_volume_get_drive           (GnomeVFSVolume *volume);
  105. char *             gnome_vfs_volume_get_device_path     (GnomeVFSVolume *volume);
  106. char *             gnome_vfs_volume_get_activation_uri  (GnomeVFSVolume *volume);
  107. char *             gnome_vfs_volume_get_filesystem_type (GnomeVFSVolume *volume);
  108. char *             gnome_vfs_volume_get_display_name    (GnomeVFSVolume *volume);
  109. char *             gnome_vfs_volume_get_icon            (GnomeVFSVolume *volume);
  110. char *             gnome_vfs_volume_get_hal_udi         (GnomeVFSVolume *volume);
  111. gboolean           gnome_vfs_volume_is_user_visible     (GnomeVFSVolume *volume);
  112. gboolean           gnome_vfs_volume_is_read_only        (GnomeVFSVolume *volume);
  113. gboolean           gnome_vfs_volume_is_mounted          (GnomeVFSVolume *volume);
  114. gboolean           gnome_vfs_volume_handles_trash       (GnomeVFSVolume *volume);
  115.  
  116. gint               gnome_vfs_volume_compare             (GnomeVFSVolume *a,
  117.                              GnomeVFSVolume *b);
  118.  
  119.  
  120. void gnome_vfs_volume_unmount    (GnomeVFSVolume           *volume,
  121.                   GnomeVFSVolumeOpCallback  callback,
  122.                   gpointer                  user_data);
  123. void gnome_vfs_volume_eject      (GnomeVFSVolume           *volume,
  124.                   GnomeVFSVolumeOpCallback  callback,
  125.                   gpointer                  user_data);
  126. void gnome_vfs_connect_to_server (char                     *uri,
  127.                   char                     *display_name,
  128.                   char                     *icon);
  129.  
  130. G_END_DECLS
  131.  
  132. #endif /* GNOME_VFS_VOLUME_H */
  133.